#include <allegro.h>
#include <iostream>
#include <cstring>
#include <vector>
#include "utility/util.h"
#include "utility/joypad.h"
#include "utility/cfgreader.h"
#include "utility/tecbattle.hpp"
#include "utility/title.hpp"

using std::cout;
using std::vector;
using std::string;

int main() {
	init(640, 480, 60, true);
	char* plc="robot1.tbd";
	
	int choose=title();
	
	if (choose) {
		for (int a=0; a < SCREEN_W/2; ++a) {
			vline(doubleBuffer,(SCREEN_W/2)-a,0,SCREEN_H, 0);
			vline(doubleBuffer,(SCREEN_W/2)+a,0,SCREEN_H, 0);
			show();
		}
		
		if (choose==1) plc="botdata/inflatec.tbd";
		else if (choose==2) plc="botdata/hydrotec.tbd";
		else if (choose==3) plc="botdata/listectrix.tbd";
		
		BattleMain *GameBattle=new BattleMain();
		
		GameBattle->BattleInit(plc);
		GameBattle->MainLoop();
		
		delete GameBattle;
	}
	
	return 0;
}
END_OF_MAIN()
